#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

void gulu_sort(int* p, int sz)
{
	int tmp = 0;
	for (int i = 0; i < sz - 1; i++)
	{
		for (int j = 1; j < sz - i; j++)
		{
			if (p[j] < p[j - 1])
			{
				tmp = p[j];
				p[j] = p[j - 1];
				p[j - 1] = tmp;
			}
		}
	}
}

int main()
{
	int a[] = { 9,8,7,6,5,4,3,2,1,0 };
	int sz = sizeof(a) / sizeof(a[0]);
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", a[i]);
	}
	gulu_sort(a, sz);
	printf("\n");
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", a[i]);
	}

	return 0;
}
